
package com.wyzz.hr.action;

import com.wyzz.hr.base.wf.overtimerequest.OrWfApproverAction;
import com.wyzz.hr.pojo.Overtimerequest;
import com.wyzz.hr.vo.OvertimeFormBean;

public class EmpOvertimeUpdAction extends OrWfApproverAction {

	public EmpOvertimeUpdAction() {
	}

	public String executeInit() throws Exception {
		if (of_Bean == null)
			of_Bean = new OvertimeFormBean();
		otr = initOfBean("update", of_Bean, orIdUp);
		if (otr == null)
			return "error";
		else
			return "success";
	}

	public String execute() throws Exception {
		String operate = "update";
		String info = super.authorityCondition;
		if ("ALL".equals(info))
			operate = "gm-update";
		if ("HR".equals(info))
			operate = "hr-update";
		if ("SUB".equals(info))
			operate = "mgr-update";
		return wfObjOpSingle(operate, of_Bean, orIdUp);
	}

	public String getOrIdUp() {
		return orIdUp;
	}

	public void setOrIdUp(String orIdUp) {
		this.orIdUp = orIdUp;
	}

	public String getOverLimit() {
		return overLimit;
	}

	public void setOverLimit(String overLimit) {
		this.overLimit = overLimit;
	}

	public OvertimeFormBean getOf_Bean() {
		return of_Bean;
	}

	public void setOf_Bean(OvertimeFormBean of_Bean) {
		this.of_Bean = of_Bean;
	}

	public String getInfoMeg() {
		return infoMeg;
	}

	public void setInfoMeg(String infoMeg) {
		this.infoMeg = infoMeg;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Overtimerequest getOtr() {
		return otr;
	}

	public void setOtr(Overtimerequest otr) {
		this.otr = otr;
	}

	private static final long serialVersionUID = 1L;
	private OvertimeFormBean of_Bean;
	private Overtimerequest otr;
	private String orIdUp;
	private String overLimit;
	private String infoMeg;
	private String errorMsg;
	private String status;
}
